package com.novel.entiy;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author tanghao
 * @date 2022/4/8
 */
@ApiModel(value = "com-novel-entiy-ScoreRecord")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "score_record")
public class ScoreRecord {
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "")
    private Integer id;

    @TableField(value = "user_id")
    @ApiModelProperty(value = "")
    private Long userId;

    @TableField(value = "novel_id")
    @ApiModelProperty(value = "")
    private Long novelId;

    @TableField(value = "score")
    @ApiModelProperty(value = "")
    private BigDecimal score;

    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    @TableField(value = "created_time",fill = FieldFill.INSERT)
    @ApiModelProperty(value = "")
    private Date createdTime;

    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    @TableField(value = "updated_time",fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "")
    private Date updatedTime;

    public static final String COL_ID = "id";

    public static final String COL_USER_ID = "user_id";

    public static final String COL_NOVEL_ID = "novel_id";

    public static final String COL_SCORE = "score";

    public static final String COL_CREATED_TIME = "created_time";

    public static final String COL_UPDATED_TIME = "updated_time";
}